<!DOCTYPE html>
<html>
    <head>
        <title>数组扁平化 - flatten的实现</title>
        <script src="../../src/array/flatten.js"></script>
    </head>
    <body>
        <script>
            // 声明一个多维数组
            const arr = [1, [2, [3, [4, 5]]], 6]

            console.log(flatten2(arr)) // [1, 2, [3, [4, 5]], 6]
        </script>
    </body>
</html>